package cn.itcast.bos.service.take_delivery;

import cn.itcast.bos.domain.page.PageBean;
import cn.itcast.bos.domain.take_delivery.Promotion;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import javax.ws.rs.*;
import java.util.Date;

public interface PromotionService {
    //保存宣传任务
    void save(Promotion model);
    //分页查询宣传任务（后台显示）
    Page<Promotion> findByPage(PageRequest request);

    //根据page和row返回分页数据pageQuery

    @Path("/pageQuery")
    @GET
    @Produces({ "application/xml", "application/json" })
    PageBean<Promotion> findPage(
            @QueryParam("page") int page,
            @QueryParam("rows") int rows);

    @Path("/promotion/{id}")
    @GET
    @Produces({ "application/xml", "application/json" })
    Promotion findById(@PathParam("id") Integer id);


    void updateStatus(Date date);
}
